package com.bifang.core.dao.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * excel模板配置主表
 *
 * @author chenzh
 * @since 2021-02-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("EXCEL_MODEL")
@ApiModel(value = "ExcelModel对象", description = "excel模板配置主表")
public class ExcelModel extends Model<ExcelModel> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "ID_", type = IdType.INPUT)
    private String id;

    @ApiModelProperty(value = "excel模板编码")
    @TableField("MODEL_CODE")
    private String modelCode;

    @ApiModelProperty(value = "excel模板名称")
    @TableField("MODEL_NAME")
    private String modelName;

    @ApiModelProperty(value = "标题字体颜色")
    @TableField("HEADER_COLOR")
    private Short headerColor;

    @ApiModelProperty(value = "标题背景颜色")
    @TableField("HEADER_BG_COLOR")
    private Short headerBgColor;

    @ApiModelProperty(value = "数据字体颜色")
    @TableField("BODY_COLOR")
    private Short bodyColor;

    @ApiModelProperty(value = "字体背景颜色")
    @TableField("BODY_BG_COLOR")
    private Short bodyBgColor;

    @ApiModelProperty(value = "xls或者xlsx")
    @TableField("EXCEL_TYPE")
    private String excelType;

    @ApiModelProperty(value = "是否大数据表格：0 否 1 是")
    @TableField("BIG_FLAG")
    private String bigFlag;

    @ApiModelProperty(value = "读取或插入数据的sheet表格名称")
    @TableField("SHEET_NAME")
    private String sheetName;

    @ApiModelProperty(value = "标题头行高")
    @TableField("HEADER_HEIGHT")
    private Integer headerHeight;

    @ApiModelProperty(value = "数据行高")
    @TableField("BODY_HEIGHT")
    private Integer bodyHeight;

    @ApiModelProperty(value = "冻结行，从第一行开始")
    @TableField("ROWSPLIT")
    private Integer rowsplit;

    @ApiModelProperty(value = "冻结列，从第一列开始")
    @TableField("COLSPLIT")
    private Integer colsplit;

    @ApiModelProperty(value = "excel分类")
    @TableField("EXCEL_CLASS")
    private String excelClass;

    @ApiModelProperty(value = "excel分类名称")
    @TableField("EXCEL_CLASS_NAME")
    private String excelClassName;

    @ApiModelProperty(value = "备注")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "版本")
    @TableField("VERSION_")
    private String version;

    @ApiModelProperty(value = "是否最新版本")
    @TableField("NEW_FLAG")
    private String newFlag;

    @ApiModelProperty(value = "标题行 从0开始")
    @TableField("HEADER_ROW_INDEX")
    private Integer headerRowIndex;

    @ApiModelProperty(value = "数据起始行 从0开始 为空则是标题行+1")
    @TableField("START_ROW_INDEX")
    private Integer startRowIndex;

    @ApiModelProperty(value = "读取或插入数据的sheet表格序号")
    @TableField("SHEET_INDEX")
    private Integer sheetIndex;

    @ApiModelProperty(value = "是否换行")
    @TableField("WRAP_TEXT")
    private String wrapText;

    @ApiModelProperty(value = "字体大小")
    @TableField("FONT_SIZE")
    private Short fontSize;

    @ApiModelProperty(value = "字体")
    @TableField("FONT_NAME")
    private String fontName;

    @ApiModelProperty(value = "边框粗细 0-13")
    @TableField("BORDER_SIZE")
    private Short borderSize;

    @ApiModelProperty(value = "边框颜色 0-64")
    @TableField("BORDER_COLOR")
    private Short borderColor;

    @ApiModelProperty(value = "创建人")
    @TableField(
            value = "CREATE_NAME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @ApiModelProperty(value = "创建时间")
    @TableField(
            value = "CREATE_TIME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @TableField(
            value = "UPDATE_NAME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    @TableField(
            value = "UPDATE_TIME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "DEL", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
